package com.lzh.service.Impl;

import com.lzh.dao.UserMapper;
import com.lzh.pojo.User;
import com.lzh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("Userservice")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;


    public User login(String username, String password) {
        try {
            return userMapper.findUserNameAndPassword(username,password);
        }catch (Exception e){
            return null;
        }

    }

    @Override
    public User selectbyid(int uid) {
        return userMapper.selectbyid(uid);
    }
}
